1. Field of the Invention
The present invention relates to a document processing apparatus which can easily edit a table.
2. Related Background Art
In a table making system in a conventional document processing apparatus, the following two methods have been used as means for drawing ruled lines.
(1) Two points of a start point and an end point of a ruled line are designated. PA1 (2) The number of lines to be drawn is designated, the distance between a ruled line as a basic line which has already been drawn and a position which has independently been designated is divided by the number of lines to be drawn to thereby obtain the positions of the ruled lines, and the ruled lines at the positions obtained are aligned to grids (100 in FIGS. 2-1A and 2-1B) as the closest lattice points. PA1 (1) The horizontal lines between the cells indicated by a hatched region are erased one by one. PA1 (2) A region surrounded by a broken line is designated and the ruled lines included therein are erased in a lump.
These methods will be described with reference to FIG. 2-1. Reference numeral 15 in FIG. 2-1A denotes a basic line. The distance between the basic line and a cursor 20 (in the case where the basic line is a horizontal line, the distance is the difference in the y coordinates; in the case where it is a vertical line, the distance is the difference in the x coordinates; in the case of this example, the distance is the difference in the y coordinates is divided by the number (5) of lines to be drawn, thereby obtaining an interval between the ruled lines. The positions of five ruled lines which are obtained by this interval are as shown by broken lines 16 in FIG. 2-1A. The positions of these ruled lines are aligned to the nearest grids 100, so that a result as shown in FIG. 2-1B is obtained.
However, in tables which are generally used in documents, in spite of the fact that there are many tables in which the line widths are equal, in the case of using the method of dividing and drawing ruled lines, as shown in FIG. 2-1B, a deviation of an interval of at most one grid is caused, so that the ruled lines can hardly be drawn at regular intervals. On the other hand, since rules lines which are parallel with one ruled line and whose lengths are equal to that of this line are drawn every time in order to make one table, the drawing operations are complicated.
According to the table making system in a conventional document processing apparatus, for instance, in the case where a cell (a region surrounded by the ruled lines to input and display characters) shown by a hatched region in a table as shown in FIG. 2-2A becomes unnecessary and it is intended to change as shown in FIG. 2-2B, the following methods have been used.
However, according to the method of (1), in the case of a table having a number of lines, it takes a large amounts of time. In the case of the method of (2), all of the ruled lines in the designated region are erased, the ruled lines of the cells adjacent to the unnecessary cells are erased, and the constructions of the necessary cells are lost as shown in FIG. 2-2C, so that there is a drawback such that other lines must be drawn to reconstruct the cells.
In the table making system in a conventional document processing apparatus, the erasure of characters is caused when a cell (a rectangular region surrounded by ruled lines) as a region to input and display characters becomes the non-cell by erasing the ruled lines.
This problem will now be described with reference to FIG. 2-3. C.sub.1 in FIG. 2-3A denotes a cell surrounded by horizontal lines H.sub.1 and H.sub.2 and vertical lines V.sub.1 and V.sub.2. Characters T.sub.1 are held by H.sub.1 and H.sub.1 forms the upper side of the cell, so that it is displayed. For example, when the vertical line V.sub.1 is erased, C.sub.1 does not become a cell and the region to display characters is extinguished. Thus, the characters T.sub.1 are not displayed as shown in FIG. 2-3B. However, H.sub.1 ' still holds the characters T.sub.1.
However, according to the foregoing system, there is the drawback that the data which cannot be seen by the operator, i.e., the data which is not used, remains.
In the table forming system in a conventional document processing apparatus, characters displayed in a cell are not displayed when a cell (a rectangular region surrounded by ruled lines) as a region to input and display characters becomes a non-cell by moving the ruled lines.
This problem will now be described with reference to FIG. 2-3. C.sub.1 in FIG. 2-3A denotes a cell surrounded by the horizontal lines H.sub.1 and H.sub.2 and vertical lines V.sub.1 and V.sub.2. Characters in the cell are held by the upper left end horizontal line of the cell.
In FIG. 2-3A, the characters T.sub.1 are held by H.sub.1.
For instance, when the vertical line V.sub.1 in FIG. 2-3A is moved to V.sub.1 ' as shown in FIG. 2-3B, the cell C.sub.1 in FIG. 2-3A becomes a non-cell, so that no character is displayed. However, H.sub.1 ' still keeps the characters T.sub.1. However, according to this system, there is the drawback that the data which cannot be seen by the operator, i.e., the data which is not used, remains.